<template>
  <div class='wrap'>
    <div class='container w'>
      <div class="banner">
        <div class="bg-img"></div>
        <div class="bg"></div>
        <div class="center">
            <div class="banner-main-title">淘宝免费开店</div>
            <div class="banner-sub-title">让天下没有难做的生意</div>
            <el-button type="primary" round @click="drawer=true">立即开店</el-button>
        </div>
      </div>
      <el-drawer
        title="申请开店"
        size="400px"
        :modal="false"
        :visible.sync="drawer"
        direction="rtl"
        :before-close="handleClose">
        <el-form ref="form" :model="form" >
          <el-form-item >
            <div class="input">
            <span>姓名</span>
            <el-input v-model="form.name" placeholder="请输入姓名"></el-input>
            </div>
          </el-form-item>
          <el-form-item >
            <div class="input">
            <span>手机号码</span>
            <el-input v-model="form.phone" placeholder="请输入手机号码"></el-input>
            </div>
          </el-form-item>
           <el-form-item >
            <div class="input">
            <span>身份证</span>
            <el-input v-model="form.idCard" placeholder="请输入身份证"></el-input>
            </div>
          </el-form-item>
           <el-form-item >
            <div class="input">
            <span>联系地址</span>
            <el-input v-model="form.address" placeholder="请输入地址"> </el-input>
            </div>
          </el-form-item>
           <el-form-item >
             <div class="sfz">
                <el-upload
                action="https://jsonplaceholder.typicode.com/posts/"
                list-type="picture-card"
                :on-preview="handlePictureCardPreview"
                :on-remove="handleRemove">
                <i class="el-icon-picture"></i>
                身份证正面
              </el-upload>
               <el-upload
                action="https://jsonplaceholder.typicode.com/posts/"
                list-type="picture-card"
                :on-preview="handlePictureCardPreview"
                :on-remove="handleRemove">
                <i class="el-icon-picture"></i>
                身份证反面
              </el-upload>
             </div>
            
          </el-form-item>
           <el-form-item >
             <el-upload
                action="https://jsonplaceholder.typicode.com/posts/"
                list-type="picture-card"
                :on-preview="handlePictureCardPreview"
                :on-remove="handleRemove">
                <i class="el-icon-picture"></i>
                手持身份证
              </el-upload>
          </el-form-item>

          <el-form-item >
             <el-button  type="primary" round>申请开店</el-button>
          </el-form-item>

        </el-form>
            <!-- <el-image style="width: 60px; height: 60px" src="url" fit="fit"></el-image> -->
  </el-drawer>
    </div>
   </div>
</template>

<script>
  export default {
    name: 'OpenShop',
    components: {},
    data() {
      return {
        form:{
          name:'',
          phone:'',
          idCard:'',
          address:'',
          just:'',//身份证正面
          opposite:'',//身份证反面
          take:''//手持身份证
        },
        drawer: false,
      };
    },
    created() {},
    methods: {
      handleClose(done) {
        this.$confirm('确认关闭？')
          .then(_ => {
            done();
          })
          .catch(_ => {});
      },
      handleRemove(file, fileList) {
        console.log(file, fileList);
      },
      handlePictureCardPreview(file) {
        this.dialogImageUrl = file.url;
        this.dialogVisible = true;
      }
    }, 
  };
</script>
<style lang="scss" scoped>

.banner{
  position: relative;
}
.bg-img{
  height: 100vh;
  background: url(~@/assets/common/OpenShop-1290-860.png) center center / cover no-repeat;
  z-index: 1;
}
.bg{
  position: absolute;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}
.center{
   position: absolute;
  //  height: 400px;
    // background:#ccc;
    top: 40%;
    left: 50%;
    text-align: center;
    transform: translate(-50%, -40%);
    .banner-main-title{
      ine-height: 90px;
    font-size: 64px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    }
    .banner-sub-title{
      margin: 60px 0 60px 0;
      ine-height: 33px;
      font-size: 24px;
      font-weight: 600;
        opacity: .7;
        padding: 0 20px;
      color: #fff;
      text-align: center;
    }
    .el-button{
      width: 140px;
      box-shadow: 0 0 5px rgba(96, 129, 248, 0.5);
    }
}







::v-deep .el-drawer__header{
  margin:0;
  padding-bottom:15px ;
  // background: #f5f6f7;
}
::v-deep .el-drawer__body{
  // background: #eff0f1;
  font-size:14px;
  color: rgb(113, 101, 101);
}

.el-form{
  // position: absolute;
  top: 20%;
  position: relative;
  padding: 0px 20px;
}
.input{
  display:flex;
  padding-left:15px;
  height: 40px;
  border: 1px solid #ccc;
  border-radius: 100px;
  overflow: hidden;
  span{
    white-space: nowrap;
    width: auto;
  }
}
::v-deep .el-input__inner{
  // border-radius: 100px;
  border:none;
}
.el-image{
    display: block;
    border-radius: 4px;
    margin-right: 10px;
  }
  .sfz{
    display: flex;
    justify-content: space-between
  }
  ::v-deep .el-upload,
  .el-upload-list, .el-upload-list--picture-card{
    // margin:10px 0;
    // width: 100%;
    width: 170px;
    height: 100px;
    line-height: 100px;
    border: 1px dashed #c0ccda;
  }
  .el-upload--picture-card i{
    font-size: 18px;
  }
.el-button{
  // position: absolute;
  // bottom: 0px;
  width: 100%;
}
</style>